home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
3006
/
3006.xpi
/
chrome
/
dwhelper.jar
/
content
/
conv-rule-list.xml
< prev
next >
Wrap
Extensible Markup Language
|
2010-01-15
|
3KB
|
140 lines
<?xml version="1.0"?>
<!-- *****************************************************************************
* Copyright (c) 2006-2009 Michel Gutierrez. All Rights Reserved.
****************************************************************************** -->
<!DOCTYPE bindings SYSTEM "chrome://dwhelper/locale/dwhelper.dtd" >
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="ConvRuleList" extends="widgets.xml#widget">
<xbl:content xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<tree
anonid="xTree"
id="dwhelper-conv-rule-list"
flex="1"
enableColumnDrag="false"
hidecolumnpicker="true"
flags="dont-build-content"
datasources="rdf:null"
ref="urn:root"
style="height: 100%"
seltype="single"
>
<treecols>
<treecol
id="dwhelper-conv-rule-list-col0"
anonid="xCol0"
primary="true"
flex="1"
Xlabel="&column.conversion.rules;"
hideheader="true"
/>
</treecols>
<template>
<rule>
<conditions>
<content uri="?root"/>
<member container="?root" child="?rule"/>
<triple subject="?rule"
predicate="http://downloadhelper.net/1.0#label"
object="?label"/>
</conditions>
<action>
<treechildren>
<treeitem
uri="?rule" open="true"
>
<treerow tooltiptext="?label">
<treecell
label="?label"
value="0"
/>
</treerow>
</treeitem>
</treechildren>
</action>
</rule>
</template>
</tree>
<children style="display: none;"/>
</xbl:content>
<implementation>
<constructor>
<![CDATA[
this.datasource=this.convertMgr.getDataSourceCopy();
this.util.setDatasource(this.xTree,this.datasource);
]]>
</constructor>
<method name="getSelectedRule">
<body>
<![CDATA[
var selectCount = this.xTree.view.selection.count;
if(selectCount>0) {
var res=this.xTree.builderView.getResourceAtIndex(this.xTree.currentIndex);
if(res!=null) {
return res.Value;
}
}
return null;
]]>
</body>
</method>
<method name="select">
<parameter name="rule"/>
<body>
<![CDATA[
var RDF=this.util.getRDF();
var index=-1;
if(rule) {
var ruleRes=RDF.GetResource(rule);
index=this.xTree.builderView.getIndexOfResource(ruleRes);
}
this.xTree.view.selection.select(index);
]]>
</body>
</method>
<method name="getDataSource">
<body>
<![CDATA[
return this.datasource;
]]>
</body>
</method>
</implementation>
<handlers>
<handler event="dblclick">
<![CDATA[
this.fireEvent("RuleDblClicked");
]]>
</handler>
<handler event="select">
<![CDATA[
this.fireEvent("RuleSelect");
]]>
</handler>
</handlers>
</binding>
</bindings>